<%@page import="org.jeecgframework.web.util.StaticValue" %>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title>cbs_invoice_info</title>
    <t:base type="jquery,easyui,tools,DatePicker"></t:base>
    <script type="text/javascript" src="plug-in/ckfinder/ckfinder.js"></script>
    <script type="text/javascript">

        $(function () {
            changeType();
        })

        function changeType() {
            var type = $("#genre").val();
            if (type == '<%=StaticValue.DIC_GENRE_AGENCY%>') {
                $("#org").show();
                $("#cinema").hide();
                $("#departname").attr({"datatype": "*", "nullmsg": "请选择所属机构"});
                $("#cinemaName").removeAttr("datatype nullmsg");
            } else if (type == '<%=StaticValue.DIC_GENRE_CINEMA%>') {
                $("#cinema").show();
                $("#org").hide();
                $("#cinemaName").attr({"datatype": "*", "nullmsg": "请选择所属影院"});
                $("#departname").removeAttr("datatype nullmsg");
            }
        }
    </script>
</head>
<body>
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table"
             action="cbsInvoiceInfoController.do?doAdd" tiptype="3">
    <input id="id" name="id" type="hidden" value="${cbsInvoiceInfoPage.id }">
    <table cellpadding="0" cellspacing="1" class="formtable">
        <%--<tr>--%>
            <%--<td align="right">--%>
                <%--<label class="Validform_label">--%>
                    <%--发票类型 :--%>
                <%--</label>--%>
            <%--</td>--%>
            <%--<td class="value">--%>
                <%--<t:dictSelect field="invoiceGenre" typeGroupCode="<%=StaticValue.DIC_INVOICE_GENRE %>"--%>
                              <%--hasPleaseSelect="false" defaultVal="${cbsInvoiceInfoPage.invoiceGenre }"></t:dictSelect>--%>
                <%--<span class="Validform_checktip"></span>--%>
                <%--<label class="Validform_label" style="display: none;">发票类型 </label>--%>
            <%--</td>--%>
            <%--<td align="right">--%>
                <%--<label class="Validform_label">--%>
                    <%--类型 :--%>
                <%--</label>--%>
            <%--</td>--%>
            <%--<td class="value">--%>
                <%--<select name="genre" id="genre" onchange="changeType()">--%>
                    <%--<option id='cinema_contact' value="<%=StaticValue.DIC_GENRE_CINEMA %>"--%>
                            <%--<c:if test="${cbsInvoiceInfoPage.genre=='cinema' }">selected</c:if>>影院--%>
                    <%--</option>--%>
                    <%--<option id='tp_contact' value="<%=StaticValue.DIC_GENRE_AGENCY %>"--%>
                            <%--<c:if test="${cbsInvoiceInfoPage.genre=='agency' }">selected</c:if>>机构--%>
                    <%--</option>--%>
                <%--</select>--%>
                <%--<span class="Validform_checktip"></span>--%>
                <%--<label class="Validform_label" style="display: none;">类型 </label>--%>
            <%--</td>--%>
        <%--</tr>--%>
        <tr>


            <td align="right" width="15%">
                <label class="Validform_label">
                    类型 :
                </label>
            </td>
            <td class="value" >
                <select name="genre" id="genre" onchange="changeType()">
                    <option id='cinema_contact' value="<%=StaticValue.DIC_GENRE_CINEMA %>"
                            <c:if test="${cbsInvoiceInfoPage.genre=='cinema' }">selected</c:if>>影院
                    </option>
                    <option id='tp_contact' value="<%=StaticValue.DIC_GENRE_AGENCY %>"
                            <c:if test="${cbsInvoiceInfoPage.genre=='agency' }">selected</c:if>>机构
                    </option>
                </select>
                <span class="Validform_checktip"></span>
                <label class="Validform_label" style="display: none;">类型 </label>
            </td>
            <td align="right">
                <label class="Validform_label">
                    所属机构或影院:
                </label>
            </td>
            <td class="value" id="cinema">
                <input name="belongCinema.id" type="hidden" id="belongCinema"
                       value="${cbsInvoiceInfoPage.belongCinema.id}">
                <input name="cinemaName" class="inputxt" id="cinemaName" readonly="readonly" datatype="*"
                       nullmsg="请选择所属影院" value="${cbsInvoiceInfoPage.belongCinema.name}"/>

            </td>
            <td class="value" id="org" style="display: none;">
                <input name="belongOrg.id" type="hidden" id="belongOrg" value="${cbsInvoiceInfoPage.belongOrg.id}">
                <input name="departname" class="inputxt" id="departname" readonly="readonly" nullmsg="请选择所属机构"
                       value="${cbsInvoiceInfoPage.belongOrg.departname}"/>

            </td>
        </tr>
        <tr class="genTr">
            <td align="right">
                <label class="Validform_label">
                    发票抬头 :
                </label>
            </td>
            <td colspan="3" class="value">
                <input id="invoiceTitle" name="invoiceTitle" type="text" style="width: 95%" class="inputxt"
                       datatype="s1-30"  value="${cbsInvoiceInfoPage.invoiceTitle}"/>
                <span class="Validform_checktip"></span>
                <label class="Validform_label" style="display: none;">客户电话 </label>
            </td>
        </tr>
        <tr class="dedTr">
            <td align="right">
                <label class="Validform_label">
                    税号 :
                </label>
            </td>
            <td class="value">
                <input id="clientTaxnum" name="clientTaxnum" type="text" style="width: 150px" class="inputxt"
                       datatype="s1-30" value="${cbsInvoiceInfoPage.clientTaxnum}">
                <span class="Validform_checktip"></span>
                <label class="Validform_label" style="display: none;">客户税号 </label>
            </td>
            <td align="right">
                <label class="Validform_label">
                    银行名称 :
                </label>
            </td>
            <td class="value">
                <input id="clientBankname" name="clientBankname" type="text" style="width: 150px" class="inputxt"
                       datatype="s1-30" value="${cbsInvoiceInfoPage.clientBankname}"/>
                <span class="Validform_checktip"></span>
                <label class="Validform_label" style="display: none;">客户银行名称 </label>
            </td>
        </tr>
        <tr class="dedTr">
            <td align="right">
                <label class="Validform_label">
                    银行账号 :
                </label>
            </td>
            <td class="value" colspan="3">
                <input id="clientBankaccount" name="clientBankaccount" type="text" style="width: 90%" class="inputxt"
                       datatype="n1-30" value="${cbsInvoiceInfoPage.clientBankaccount}" />
            </td>
        </tr>
        <tr>
            <td align="right">
                <label class="Validform_label">
                    客户电话 :
                </label>
            </td>
            <td class="value" colspan="3">
                <input id="clientPhone" name="clientPhone" type="text" style="width: 150px" class="inputxt"
                       value="${cbsInvoiceInfoPage.clientPhone}"
                       datatype="cPhone" ajaxurl="cbsInvoiceInfoController.do?getInvoiceInfobyclientPhone"/>
                <span class="Validform_checktip"></span>
                <label class="Validform_label" style="display: none;">客户电话 </label>
            </td>
        </tr>
    </table>
</t:formvalid>
</body>
<script src="webpage/com/buss/invoice_info/cbsInvoiceInfo.js"></script>